import math
n=int(input())
for i in range(0,n,1):
l=list(map(int,input().split()))
n=l[0]
m=l[1]
k=l[2]
l1=[0]*n
x=n-m
j=1
p=n
for i in range(x,n):
l1[i]=j
j+=1
for i in range(0,x):
l1[i]=p
p-=1
for i in range(0,n):
print(l1[i],end=" ")
print(end="\n")
1701C - Schedule Management | 791C - Bear and Different Names |
940D - Alena And The Heater | 1747B - BAN BAN |
1747A - Two Groups | 1747C - Swap Game |
1183D - Candy Box (easy version) | 777B - Game of Credit Cards |
1362A - Johnny and Ancient Computer | 900C - Remove Extra One |
328A - IQ Test | 290B - QR code |
290A - Mysterious strings | 1593E - Gardener and Tree |
290D - Orange | 1027B - Numbers on the Chessboard |
813A - The Contest | 1560E - Polycarp and String Transformation |
182D - Common Divisors | 145A - Lucky Conversion |
46B - T-shirts from Sponsor | 545E - Paths and Trees |
146B - Lucky Mask | 1257E - The Contest |
932C - Permutation Cycle | 1423K - Lonely Numbers |
831C - Jury Marks | 94B - Friends |
443B - Kolya and Tandem Repeat | 582B - Once Again |